<template>
  <div style="max-width:800px;margin:40px auto;font-family:Arial, Helvetica, sans-serif;">
    <h1>AI 智能笔记助手</h1>
    <Recorder @result="onResult" />
    <div v-if="result" style="margin-top:20px;border:1px solid #ddd;padding:16px;border-radius:8px;">
      <h3>转写文本</h3>
      <pre>{{ result.transcript }}</pre>
      <h3>摘要</h3>
      <p>{{ result.summary }}</p>
      <h3>关键点</h3>
      <ul>
        <li v-for="(kp, idx) in result.keyPoints" :key="idx">{{ kp }}</li>
      </ul>
    </div>
  </div>
</template>

<script>
import Recorder from './components/Recorder.vue'
export default {
  components: { Recorder },
  data() { return { result: null } },
  methods: {
    onResult(res) { this.result = res }
  }
}
</script>
